package net.similarsu.device.sdk.dah.struct;

import com.sun.jna.Pointer;
import com.sun.jna.Structure;

import static net.similarsu.device.sdk.dah.library.DahLibrary.DH_SERIALNO_LEN;

@Structure.FieldOrder({
        "sSerialNumber"
        ,"nAlarmInPortNum"
        ,"nAlarmOutPortNum"
        ,"nDiskNum"
        ,"nDVRType"
        ,"nChanNum"
        ,"byLimitLoginTime"
        ,"byLeftLogTimes"
        ,"bReserved"
        ,"nLockLeftTime"
        ,"Reserved"
})
public class NET_DEVICEINFO_Ex extends Structure {
    public byte[] sSerialNumber = new byte[DH_SERIALNO_LEN];     // 序列号
    public int nAlarmInPortNum;                    // DVR报警输入个数
    public int nAlarmOutPortNum;                   // DVR报警输出个数
    public int nDiskNum;                           // DVR硬盘个数
    public int nDVRType;                           // DVR类型,见枚举 NET_DEVICE_TYPE
    public int nChanNum;                           // DVR通道个数
    public byte byLimitLoginTime;                   // 在线超时时间,为0表示不限制登陆,非0表示限制的分钟数
    public byte byLeftLogTimes;                     // 当登陆失败原因为密码错误时,通过此参数通知用户,剩余登陆次数,为0时表示此参数无效
    public byte[] bReserved = new byte[2];                       // 保留字节,字节对齐
    public int nLockLeftTime;                      // 当登陆失败,用户解锁剩余时间（秒数）, -1表示设备未设置该参数
    public byte[] Reserved = new byte[24];         // 保留

    public NET_DEVICEINFO_Ex(){
        super();
    }

    public NET_DEVICEINFO_Ex(Pointer pointer){
        super(pointer);
    }

    public static class ByReference extends NET_DEVICEINFO_Ex implements Structure.ByReference {
    };

    public static class ByValue extends NET_DEVICEINFO_Ex implements Structure.ByValue {
    };
}
